#include <iostream>
using namespace std;
int a[10];
int b[10];
int count_a=0,count_b=0;

int output(int num1,int num2);
int main()
{
	int src1,src2;
	while(cin>>src1>>src2){
		output(src1,src2);
	}
}

int output(int num1,int num2)
{
	
	while(num1>0){
		a[count_a]=num1%10;
		num1=num1/10;
		count_a++;
	}
	
	while(num2>0){
		b[count_b]=num2%10;
		num2=num2/10;
		count_b++;
	}
	int temp=0;
	for(int i=0;i<count_a;i++){
		for(int j=0;j<count_b;j++){
			temp=temp+a[i]*b[j];
		}
	}
	cout<<temp<<endl;
	count_a=0;
	count_b=0;
}
